1. Technical Field
The present invention relates to the processing of images, and more particularly to the management of data relating to images stored in memory external to an image processing device.
2. Description of the Related Art
In certain applications, for example in the domain of video, a mass storage device, or external memory, stores data to be processed by a processor of a data processing device according to a given algorithm. The data can be stored in this memory in a format which differs from the data format used by the processor.
In particular, these data stored in external memory can correspond to information on chrominance and luminance. Video images are conventionally encoded using such information. To covert a video signal into chrominance data and luminance data, the signal is sampled. Then chrominance and/or luminance data are associated with all or part of the samples depending on the encoding used for the image.
Different encoding formats are conventionally used. For example, the terms ‘4:2:2’ and ‘4:2:0’ designate different encoding formats which are conventionally used, each describing a different structure for a digital image. The term 4:2:2 indicates that the chrominance is horizontally subsampled by a factor of two relative to the luminance. The term 4:2:0 signifies that the chrominance is horizontally and vertically subsampled by a factor of two relative to the luminance. Thus the stored data vary not only as a function of the encoding of the video image, which provides more or less luminance data and chrominance data for a video image, but also as a function of the storage format of the encoded data, because the chrominance and luminance data can successively alternate in memory in the order of the pixels of an image or can be stored separately with the chrominance data in one place and the luminance data in another.
To retrieve data from external memory, it is conventional to use a DMA device (Direct Memory Access). A DMA device enables direct transfers of data between external memory and the internal memory associated with the processor without requiring the intervention of the microprocessor, with some exceptions, such as when initiating and concluding the data transfer.
Generally, the processor processes video data relative to the respective positions of the pixels which form the video images.
The data are stored at respective addresses in the external memory, then, in order for the processor to process the data, they are requested via the DMA as a function of the position of the pixels with which they are associated, generally meaning as a function of the spatial coordinates of the different pixels in the images.
For some of the processing applied by the processor, the latter may request via the DMA the retrieval of certain data from external memory without knowing the format of the data stored in the external memory. Therefore the processor may not be able to indicate to the DMA the memory address or addresses corresponding to the data it requires.
In such conditions, the DMA is responsible for translating the information received in a data request from the processing device into an address according to the storage format in external memory. To perform such a translation and retrieve the requested data from the external memory, a fixed correspondence rule is generally determined in the DMA to establish a correspondence between the information received in the request and an address in the external memory.
But such a fixed correspondence rule is directly linked to the storage formats used. It can therefore be complex and difficult to adapt a DMA to another storage format in external memory.